package cn.autumnorange.authorization.security.controller;

import cn.autumnorange.authorization.security.security.GramtedAuthorityImpl;

import java.util.ArrayList;

public class UserDetailDto {
    private String username;
    private String password;
    //    private Collection<GramtedAuthorityImpl> authorities;

    public UserDetailDto() {
        //    this.username = "admin";
        //    this.password = "$2a$10$NOEHdEJIXfGXg3Hkjg88EOzR/0joUopUlkIpDPkmiah1bx4TMRwf.";
        GramtedAuthorityImpl gramtedAuthority = new GramtedAuthorityImpl("ROLE_admin");
        ArrayList arrayList = new ArrayList<GramtedAuthorityImpl>();
        arrayList.add(gramtedAuthority);
//    authorities = arrayList;
    }

    public UserDetailDto(String username, String password) {
        this.username = username;
        this.password = password;
//        GramtedAuthorityImpl gramtedAuthority = new GramtedAuthorityImpl("ROLE_admin");
//        ArrayList arrayList = new ArrayList<GramtedAuthorityImpl>();
//        arrayList.add(gramtedAuthority);
//        authorities = arrayList;
    }


//    public Collection<GramtedAuthorityImpl> getAuthorities() {
//        return authorities;
//    }
//
//    public void setAuthorities(Collection<GramtedAuthorityImpl> authorities) {
//        this.authorities = authorities;
//    }


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
